package club.ruanx.auth.vcode.image;

import club.ruanx.auth.vcode.ValidateCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * @author 阮胜
 * @date 2018/9/30 13:07
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ImageCode extends ValidateCode {
    private static final long serialVersionUID = -3713190141986540761L;

    private BufferedImage image;

    public ImageCode(String code, int expireInSeconds) {
        super(code, expireInSeconds);
    }

    public ImageCode(String code, LocalDateTime expireTime) {
        super(code, expireTime);
    }

    public ImageCode(String code, BufferedImage image) {
        super(code);
        this.image = image;
    }

    public ImageCode(String code, int expireInSeconds, BufferedImage image) {
        super(code, expireInSeconds);
        this.image = image;
    }
}
